
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpImGroup.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpImUsermsgForm"
 */
public class CcpImMsgForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cimGuid = null;
   private java.lang.String _cimData = null;
   private java.lang.String _cimDate = null;
   private java.lang.Integer _cimDel = null;
   private java.lang.String _cimResv1 = null;
   private java.lang.String _cimResv2 = null;
   private java.lang.String _cimResv3 = null;

   /**
    * Standard constructor.
    */
   public CcpImMsgForm() {
   }

   /**
    * Returns the cimGuid
    *
    * @return the cimGuid
    */
   public java.lang.String getCimGuid() {
      return _cimGuid;
   }

   /**
    * Sets the cimGuid
    *
    * @param cimGuid the new cimGuid value
    */
   public void setCimGuid(java.lang.String cimGuid) {
      _cimGuid = cimGuid;
   }
   /**
    * Returns the cimData
    *
    * @return the cimData
    */
   public java.lang.String getCimData() {
      return _cimData;
   }

   /**
    * Sets the cimData
    *
    * @param cimData the new cimData value
    */
   public void setCimData(java.lang.String cimData) {
      _cimData = cimData;
   }
   /**
    * Returns the cimDate
    *
    * @return the cimDate
    */
   public java.lang.String getCimDate() {
      return _cimDate;
   }

   /**
    * Sets the cimDate
    *
    * @param cimDate the new cimDate value
    */
   public void setCimDate(java.lang.String cimDate) {
      _cimDate = cimDate;
   }
   /**
    * Returns the cimDel
    *
    * @return the cimDel
    */
   public java.lang.Integer getCimDel() {
      return _cimDel;
   }

   /**
    * Sets the cimDel
    *
    * @param cimDel the new cimDel value
    */
   public void setCimDel(java.lang.Integer cimDel) {
      _cimDel = cimDel;
   }
   /**
    * Returns the cimResv1
    *
    * @return the cimResv1
    */
   public java.lang.String getCimResv1() {
      return _cimResv1;
   }

   /**
    * Sets the cimResv1
    *
    * @param cimResv1 the new cimResv1 value
    */
   public void setCimResv1(java.lang.String cimResv1) {
      _cimResv1 = cimResv1;
   }
   /**
    * Returns the cimResv2
    *
    * @return the cimResv2
    */
   public java.lang.String getCimResv2() {
      return _cimResv2;
   }

   /**
    * Sets the cimResv2
    *
    * @param cimResv2 the new cimResv2 value
    */
   public void setCimResv2(java.lang.String cimResv2) {
      _cimResv2 = cimResv2;
   }
   /**
    * Returns the cimResv3
    *
    * @return the cimResv3
    */
   public java.lang.String getCimResv3() {
      return _cimResv3;
   }

   /**
    * Sets the cimResv3
    *
    * @param cimResv3 the new cimResv3 value
    */
   public void setCimResv3(java.lang.String cimResv3) {
      _cimResv3 = cimResv3;
   }

   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCimGuid() == null) {
         errors.add("cimGuid", new ActionError("error.cimGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
